<template>
  <el-form ref="form" :model="form" label-width="80px">
    <el-form-item label="标题">
      <el-input v-model="form.title"></el-input>
    </el-form-item>
    <el-form-item label="老师">
      <el-select v-model="form.teacher" placeholder="请选择老师">
        <el-option label="区域一" value="shanghai"></el-option>
        <el-option label="区域二" value="beijing"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="班级">
      <el-select v-model="form.class" placeholder="请选择班级">
        <el-option v-for="(className,index) in $store.state.classList" :key="index" :label="className" :value="className"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="调查时间">
      <el-col :span="11">
        <el-date-picker type="date" placeholder="选择日期" v-model="form.year"></el-date-picker>
      </el-col>
    </el-form-item>
    <el-form-item label="是否开启">
      <el-switch v-model="form.active"></el-switch>
    </el-form-item>
    <el-form-item label="备注">
      <el-input type="textarea" v-model="form.desc"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="onSubmit">立即创建</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
  export default {
    name: "AddStatisFaction",
    data(){
      return{
        form:{}
      }
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      }
    }
  }
</script>

<style scoped>

</style>
